<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Playbook - Playbook</title>
    <link rel="stylesheet" type="text/css" href="https://playbook-ui.github.io/playbook-ios/all.css" media="all" />
</head>
<body>
    <header>
        <a href="https://playbook-ui.github.io/playbook-ios">
            <strong>
                Playbook
            </strong>
            <span>Documentation</span>
        </a>
    </header>

    <!--
    <form class="search">
        <input type="search" placeholder="Search" />
    </form>
    -->

    <nav>
        <div class="wrapper">
            <h2>On This Page</h2>
            <ol><li><a href="#initializers">Initializers</a><ul><li class="initializer"><a href="#playbook.init()">init()</a></li></ul></li><li><a href="#properties">Properties</a><ul><li class="variable"><a href="#playbook.`default`">`default`</a></li><li class="variable"><a href="#playbook.stores">stores</a></li></ul></li><li><a href="#methods">Methods</a><ul><li class="function"><a href="#playbook.scenarios(of:)">scenarios(of:​)</a></li><li class="function"><a href="#playbook.add(_:)">add(_:​)</a></li><li class="function"><a href="#playbook.addscenarios(of:_:)">add​Scenarios(of:​_:​)</a></li><li class="function"><a href="#playbook.run(_:_:)">run(_:​_:​)</a></li></ul></li></ol>
        </div>
    </nav>

    <main>
        <article>
            <h1>
    <small>Class</small>
    <code class="name">Playbook</code>
</h1>

<div class="declaration">
<pre class="highlight"><code><html><body><span class="attribute">open</span> <span class="keyword">class</span> <span class="type">Playbook</span>  </body></html></code></pre>
</div>
<div class="summary" role="doc-abstract">
    <p>The central scenario manager.</p>

</div>
<div class="discussion">
    <p>You can use the singleton <code>default</code> or use it
with instantiate arbitrarily.</p>

<html><body><pre class="highlight"><code><span class="keyword">struct</span> <span class="type">Content</span>: <span class="type">View</span> {
    <span class="keyword">var</span> <span class="variable">body</span>: <span class="keyword">some</span> <span class="type">View</span> {
        <span class="variable">Text</span>(<span class="string literal">"</span><span class="string literal">Playbook</span><span class="string literal">"</span>)
    }
}

<span class="variable">Playbook</span>.<span class="variable">default</span>.<span class="variable">addScenarios</span>(<span class="variable">of</span>: <span class="string literal">"</span><span class="string literal">Components</span><span class="string literal">"</span>) {
    <span class="variable">Scenario</span>(<span class="string literal">"</span><span class="string literal">Content</span><span class="string literal">"</span>, <span class="variable">layout</span>: .<span class="variable">compressed</span>) {
        <span class="variable">Content</span>()
    }
}
</code></pre></body></html>
</div>

    <section id="initializers">
        <h2>Initializers</h2>

        <div role="article" class="initializer" id="playbook.init()">
    <h3>
        <code><a href="#playbook.init()">init()</a></code>
    </h3>
    <div class="declaration">
<pre class="highlight"><code><html><body><span class="keyword">public</span> <span class="keyword">init</span>()  </body></html></code></pre>
</div>
<div class="summary" role="doc-abstract">
    <p>Initialize a new <code>Playbook</code>.</p>

</div>
</div>
    </section>
    <section id="properties">
        <h2>Properties</h2>

        <div role="article" class="variable" id="playbook.`default`">
    <h3>
        <code><a href="#playbook.`default`">`default`</a></code>
    </h3>
    <div class="declaration">
<pre class="highlight"><code><html><body><span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">let</span> <span class="variable">`default`</span>  </body></html></code></pre>
</div>
<div class="summary" role="doc-abstract">
    <p>The default shared instance of <code>Playbook</code>.</p>

</div>
</div>
<div role="article" class="variable" id="playbook.stores">
    <h3>
        <code><a href="#playbook.stores">stores</a></code>
    </h3>
    <div class="declaration">
<pre class="highlight"><code><html><body><span class="keyword">public</span> <span class="keyword">var</span> <span class="variable">stores</span>: [<a href="https://playbook-ui.github.io/playbook-ios/ScenarioStore"><span class="type">ScenarioStore</span></a>]  </body></html></code></pre>
</div>
<div class="summary" role="doc-abstract">
    <p>A set of stores that holds the added scenarios.</p>

</div>
</div>
    </section>
    <section id="methods">
        <h2>Methods</h2>

        <div role="article" class="function" id="playbook.scenarios(of:)">
    <h3>
        <code><a href="#playbook.scenarios(of:)">scenarios(of:​)</a></code>
    </h3>
    <div class="declaration">
<pre class="highlight"><code><html><body><span class="keyword">public</span> <span class="keyword">func</span> <span class="function">scenarios</span>(<span class="variable">of</span> <span class="variable">kind</span>: <a href="https://playbook-ui.github.io/playbook-ios/ScenarioKind"><span class="type">ScenarioKind</span></a>) -&gt; <a href="https://playbook-ui.github.io/playbook-ios/ScenarioStore"><span class="type">ScenarioStore</span></a>  </body></html></code></pre>
</div>
<div class="summary" role="doc-abstract">
    <p>Returns a store identified by specified kind.</p>

</div>
<div class="discussion">
    <p>If there is no store yet, add and return it.</p>

</div>
<h4>Parameters</h4>

<table class="parameters">
  <thead hidden>
  <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
  </tr>
  </thead>
  <tbody>
    <tr>
    <th>kind</th>
    <td><code class="type">Scenario​Kind</code></td>
    <td><p>A unique identifier that stores a set of scenarios.</p>
</td>
</tr>
  </tbody>
</table>
  <h4>Returns</h4>
  <p>A store identified by specified kind.</p>

</div>
<div role="article" class="function" id="playbook.add(_:)">
    <h3>
        <code><a href="#playbook.add(_:)">add(_:​)</a></code>
    </h3>
    <div class="declaration">
<pre class="highlight"><code><html><body><span class="attribute">@</span><span class="attribute">discardableResult</span>
    <span class="keyword">public</span> <span class="keyword">func</span> <span class="function">add</span>&lt;<span class="variable">Provider</span>: <a href="https://playbook-ui.github.io/playbook-ios/ScenarioProvider"><span class="type">ScenarioProvider</span></a>&gt;(<span class="keyword">_</span> <span class="variable">provider</span>: <span class="type">Provider</span>.<span class="type">Type</span>) -&gt; <span class="keyword">Self</span>  </body></html></code></pre>
</div>
<div class="summary" role="doc-abstract">
    <p>Adds a set scenarios defined in specified provider.</p>

</div>
<h4>Parameters</h4>

<table class="parameters">
  <thead hidden>
  <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
  </tr>
  </thead>
  <tbody>
    <tr>
    <th>provider</th>
    <td><code class="type">Provider.​Type</code></td>
    <td><p>A type of provider that provides a set of scenarios.</p>
</td>
</tr>
  </tbody>
</table>
  <h4>Returns</h4>
  <p>A instance of <code>self</code>.</p>

</div>
<div role="article" class="function" id="playbook.addscenarios(of:_:)">
    <h3>
        <code><a href="#playbook.addscenarios(of:_:)">add​Scenarios(of:​_:​)</a></code>
    </h3>
    <div class="declaration">
<pre class="highlight"><code><html><body><span class="attribute">@</span><span class="attribute">discardableResult</span>
    <span class="keyword">public</span> <span class="keyword">func</span> <span class="function">addScenarios</span>&lt;<span class="variable">S</span>: <a href="https://playbook-ui.github.io/playbook-ios/ScenariosBuildable"><span class="type">ScenariosBuildable</span></a>&gt;(<span class="variable">of</span> <span class="variable">kind</span>: <a href="https://playbook-ui.github.io/playbook-ios/ScenarioKind"><span class="type">ScenarioKind</span></a>, <span class="attribute">@</span><a href="https://playbook-ui.github.io/playbook-ios/ScenariosBuilder"><span class="type">ScenariosBuilder</span></a> <span class="keyword">_</span> <span class="variable">scenarios</span>: () -&gt; <span class="type">S</span>) -&gt; <span class="keyword">Self</span>  </body></html></code></pre>
</div>
<div class="summary" role="doc-abstract">
    <p>Adds a set of scenarios passed by function builder.</p>

</div>
<h4>Parameters</h4>

<table class="parameters">
  <thead hidden>
  <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
  </tr>
  </thead>
  <tbody>
    <tr>
    <th>kind</th>
    <td><code class="type">Scenario​Kind</code></td>
    <td><p>A unique identifier that stores a set of scenarios.</p>
</td>
</tr>
<tr>
    <th>scenarios</th>
    <td><code class="type">() -&gt; S</code></td>
    <td><p>A function builder that create a set of scenarios.</p>
</td>
</tr>
  </tbody>
</table>
  <h4>Returns</h4>
  <p>A instance of <code>self</code>.</p>

</div>
<div role="article" class="function" id="playbook.run(_:_:)">
    <h3>
        <code><a href="#playbook.run(_:_:)">run(_:​_:​)</a></code>
    </h3>
    <div class="declaration">
<pre class="highlight"><code><html><body><span class="keyword">public</span> <span class="keyword">func</span> <span class="function">run</span>(<span class="keyword">_</span> <span class="variable">test</span>: <a href="https://playbook-ui.github.io/playbook-ios/TestTool"><span class="type">TestTool</span></a>, <span class="keyword">_</span> <span class="variable">tests</span>: <a href="https://playbook-ui.github.io/playbook-ios/TestTool"><span class="type">TestTool</span></a>...) <span class="keyword">throws</span>  </body></html></code></pre>
</div>
<div class="summary" role="doc-abstract">
    <p>Serialy runs specified tests conform to <code>TestTool</code> protocol.</p>

</div>
<h4>Parameters</h4>

<table class="parameters">
  <thead hidden>
  <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
  </tr>
  </thead>
  <tbody>
    <tr>
    <th>test</th>
    <td><code class="type">Test​Tool</code></td>
    <td><p>The first test to be run.</p>
</td>
</tr>
<tr>
    <th>tests</th>
    <td><code class="type">Test​Tool</code></td>
    <td><p>The trailing tests to be run in order.</p>
</td>
</tr>
  </tbody>
</table>
</div>
    </section>



        </article>
    </main>

    <footer>
        <p>
    Generated on <time datetime="2021-08-25T19:01:53+0900">August 25, 2021</time> using <a href="https://github.com/SwiftDocOrg/swift-doc">swift-doc</a> <span class="version">1.0.0-rc.1</span>.
</p>
    </footer>
</body>
</html>
